A case for DOT: theoretical foundations for objects with pattern matching and GADT-style reasoning
نویسندگان
چکیده
Many programming languages in the OO tradition now support pattern matching some form. Historical examples include Scala and Ceylon, with more recent additions of Java, Kotlin, TypeScript, Flow. But on generic class hierarchies currently results puzzling type errors most these languages. Yet this combination features occurs naturally many scenarios, such as when manipulating typed ASTs. To it properly, compilers needs to implement a form subtyping reconstruction: ability reconstruct information uncovered at runtime during matching. We introduce cDOT, new calculus family Dependent Object Types (DOT) intended serve formal foundation for reconstruction. Being descended from pDOT, itself Scala, cDOT can be used encode advanced object-oriented inheritance, constructor variance, F-bounded polymorphism, first-class recursive modules. demonstrate that reconstruction subsumes GADTs by encoding λ 2, G µ , classical constraint-based GADT calculus, into cDOT.
منابع مشابه
Pattern Matching Information Flow using GADT
Integrating security policies into security assurance mechanisms to ensure end-to-end behavior is still a challenge. Information flow analysis and type checking are effective methods for the analysis and verification of secure communications and processing. Language-based information flow security models use programming-language for specifying and enforcing security policy. Dependently typed pr...
متن کاملdeveloping a pattern based on speech acts and language functions for developing materials for the course “ the study of islamic texts translation”
هدف پژوهش حاضر ارائه ی الگویی بر اساس کنش گفتار و کارکرد زبان برای تدوین مطالب درس "بررسی آثار ترجمه شده ی اسلامی" می باشد. در الگوی جدید، جهت تدوین مطالب بهتر و جذاب تر، بر خلاف کتاب-های موجود، از مدل های سطوح گفتارِ آستین (1962)، گروه بندی عملکردهای گفتارِ سرل (1976) و کارکرد زبانیِ هالیدی (1978) بهره جسته شده است. برای این منظور، 57 آیه ی شریفه، به صورت تصادفی از بخش-های مختلف قرآن انتخاب گردید...
15 صفحه اولdesigning and validating a textbook evaluation questionnaire for reading comprehension ii and exploring its relationship with achievement
در هر برنامه آموزشی، مهم ترین فاکتور موثر بر موفقیت دانش آموزان کتاب درسی است (مک دونو و شاو 2003). در حقیقت ، کتاب قلب آموزش زبان انگلیسی است( شلدن 1988). به دلیل اهمیت والای کتاب به عنوان عنصر ضروری کلاس های آموزش زبان ، کتب باید به دقت ارزیابی و انتخاب شده تا از هرگونه تاثیر منفی بر دانش آموزان جلوگیری شود( لیتز). این تحقیق با طراحی پرسش نامه ارزیابی کتاب که فرصت ارزیابی معتبر را به اساتید د...
15 صفحه اولpassivity in waiting for godot and endgame: a psychoanalytic reading
this study intends to investigate samuel beckett’s waiting for godot and endgame under the lacanian psychoanalysis. it begins by explaining the most important concepts of lacanian psychoanalysis. the beckettian characters are studied regarding their state of unconscious, and not the state of consciousness as is common in most beckett studies. according to lacan, language plays the sole role in ...
Local Derivative Pattern with Smart Thresholding: Local Composition Derivative Pattern for Palmprint Matching
Palmprint recognition is a new biometrics system based on physiological characteristics of the palmprint, which includes rich, stable, and unique features such as lines, points, and texture. Texture is one of the most important features extracted from low resolution images. In this paper, a new local descriptor, Local Composition Derivative Pattern (LCDP) is proposed to extract smartly stronger...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
ژورنال
عنوان ژورنال: Proceedings of the ACM on programming languages
سال: 2022
ISSN: ['2475-1421']
DOI: https://doi.org/10.1145/3563342